<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCustomersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('customers', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->char('advertiser');
            $table->char('website');
            $table->char('tax_identificatio')->nullable();
            $table->char('ticket_address')->nullable();
            $table->char('open_account')->nullable();
            $table->char('account')->nullable();
            $table->char('kp_tel')->nullable();
            $table->char('city')->nullable();
            $table->integer('submituser');
            $table->decimal('recharge')->default(0);
            $table->decimal('back_money')->default(0);
            $table->decimal('balance')->default(0);
            $table->decimal('invoice')->default(0);
            $table->decimal('patch_money')->default(0);
            $table->integer('type')->default(1);
            $table->char('contacts_name');
            $table->char('contacts_tel');
            $table->char('contacts_position');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('customers');
    }
}
